<!--
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/business/storagechannel/WarehouseLocation.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/business/storagechannel/WarehouseLocation.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Id',
                footer: "Foots",
                cnName: '库位信息',
                name: 'storagechannel/WarehouseLocation',
                url: "/WarehouseLocation/",
                sortName: "TheLevel,TheRow",
                foreignKey:null
            });
            const editFormFields = ref({"WarehouseLocationNo":"","TheRow":"","TheColumn":"","TheLevel":"","ConfigurationWeight":"","CurrentMaterialBox":"","MaterialBoxRFID":"","LocationDescription":"","Enable":"","IsOccupy":""});
            const editFormOptions = ref([[{"title":"库位号","field":"WarehouseLocationNo"},
                               {"title":"行","required":true,"field":"TheRow","type":"number"},
                               {"title":"列","required":true,"field":"TheColumn","type":"number"}],
                              [{"title":"层","required":true,"field":"TheLevel","type":"number"},
                               {"title":"可放置重量","field":"ConfigurationWeight","type":"decimal"},
                               {"title":"当前箱号","field":"CurrentMaterialBox"}],
                              [{"title":"当前物料箱RFID号","field":"MaterialBoxRFID"},
                               {"title":"位置描述","field":"LocationDescription"},
                               {"dataKey":"enable","data":[],"title":"是否启用","field":"Enable","type":"select"}],
                              [{"dataKey":"enable","data":[],"title":"是否占用","required":true,"field":"IsOccupy","type":"select"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:'Id',title:'主键',type:'string',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'StorageChannelId',title:'通道ID',type:'string',width:110,hidden:true,align:'left'},
                       {field:'StorageChannelNo',title:'通道编号',type:'string',width:80,align:'left',sort:true},
                       {field:'WarehouseLocationNo',title:'库位号',type:'string',link:true,width:80,align:'left'},
                       {field:'TheRow',title:'行',type:'int',width:40,require:true,align:'left'},
                       {field:'TheColumn',title:'列',type:'int',width:40,require:true,align:'left'},
                       {field:'TheLevel',title:'层',type:'int',width:40,require:true,align:'left'},
                       {field:'IsOccupy',title:'是否占用',type:'int',bind:{ key:'enable',data:[]},width:80,require:true,align:'left'},
                       {field:'ConfigurationWeight',title:'可放置重量',type:'decimal',width:110,align:'left'},
                       {field:'CurrentMaterialBox',title:'当前箱号',type:'string',width:80,align:'left'},
                       {field:'MaterialBoxRFID',title:'当前物料箱RFID号',type:'string',width:110,align:'left'},
                       {field:'LocationDescription',title:'位置描述',type:'string',width:180,align:'left'},
                       {field:'Enable',title:'是否启用',type:'int',bind:{ key:'enable',data:[]},width:80,align:'left'},
                       {field:'CreateUserName',title:'添加人',type:'string',width:110,align:'left'},
                       {field:'CreateUserId',title:'添加人ID',type:'string',width:110,hidden:true,align:'left'},
                       {field:'CreateDate',title:'添加时间',type:'datetime',width:130,align:'left',sort:true},
                       {field:'ModifyUserName',title:'修改人',type:'string',width:110,align:'left'},
                       {field:'ModifyUserId',title:'修改人ID',type:'string',width:110,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'修改时间',type:'datetime',width:130,align:'left',sort:true},
                       {field:'DeletionFlag',title:'删除标识',type:'int',width:110,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
